<?php

// +----------------------------------------------------------------------
// | liangjian.ltd
//版权所有：新动力线上书店
//开发者：Toren工作室
//开发时间：2022-09-01
// +----------------------------------------------------------------------
use think\facade\Route;
// 注册路由到News控制器的read操作
Route::put('user/bank/:id','User/updatebank')->middleware(['auth']);//更新银行卡
Route::post('user/bank','User/addbank')->middleware(['auth']);//添加银行卡
Route::get('user/bank','User/bank')->middleware(['auth']);//获取银行卡信息
Route::get('user/index','User/index')->middleware(['auth']);//个人中心首页
Route::get('user/userinfo','User/userinfo')->middleware(['auth']);//获取用户信息
Route::get('user/update','User/update')->middleware(['auth']);//获取用户信息
Route::get('user/checkBank','User/checkBank')->middleware(['auth']);//获取用户信息
Route::post('vip/placeorder','Vip/placeorder')->middleware(['auth']);//会员下单

Route::post('shopcart/edit', 'shopcart/add')->middleware(['auth']);
Route::post('shopcart/uppay', 'shopcart/uppay')->middleware(['auth']);
Route::put('shopcart/edit', 'shopcart/update')->middleware(['auth']);
Route::delete('shopcart/edit/:id', 'shopcart/delete')->middleware(['auth']);

Route::post('order/add', 'order/placeorder')->middleware(['auth']);//下订单
Route::put('order/add/:id', 'order/replaceorder')->middleware(['auth']);//重新下订单
Route::put('order/uprebackapply', 'order/uprebackapply')->middleware(['auth']);//申请退款
Route::get('order/rebackList', 'order/rebacklist')->middleware(['auth']);//申请退款记录
Route::put('order/canclereback', 'order/canclereback')->middleware(['auth']);//取消退货申请

//品牌商品
Route::get('goods/lists/:brand_id', 'goods/brandlists');//品牌商品
Route::get('goods/info/:good_id', 'goods/info');//商品详情
Route::get('goods/recommended/:good_id', 'goods/recommended');//为你推荐
//分销

Route::get('distribution/center', 'distribution/center');//分销规则
Route::post('distribution/apply', 'distribution/apply')->middleware(['auth']);//申请分销
Route::post('distribution/note', 'distribution/note')->middleware(['auth']);//分销记录
Route::post('distribution/withdrawinfo', 'distribution/withdrawinfo')->middleware(['auth']);//提现明细
Route::post('distribution/withdrawnote', 'distribution/withdrawnote')->middleware(['auth']);//提现记录
Route::post('distribution/withdraw', 'distribution/withdraw')->middleware(['auth']);//提现
Route::post('distribution/commissionnote', 'distribution/commissionnote')->middleware(['auth']);//佣金明细
Route::post('distribution/commission', 'distribution/commission')->middleware(['auth']);//我的佣金


//历史记录

Route::get('index/searchGoods', 'index/searchGoods');//商品详情
Route::post('index/clearSearchGoods', 'index/clearSearchGoods');//为你推荐
return [
    // pathinfo分隔符
    'pathinfo_depr'         => '/',
    // URL伪静态后缀
    'url_html_suffix'       => 'html',
    // URL普通方式参数 用于自动生成
    'url_common_param'      => true,
    // 是否开启路由延迟解析
    'url_lazy_route'        => false,
    // 是否强制使用路由
    'url_route_must'        => false,
    // 合并路由规则
    'route_rule_merge'      => true,
    // 路由是否完全匹配
    'route_complete_match'  => true,
    // 访问控制器层名称
    'controller_layer'      => 'controller',
    // 空控制器名
    'empty_controller'      => 'Error',
    // 是否使用控制器后缀
    'controller_suffix'     => false,
    // 默认的路由变量规则
    'default_route_pattern' => '[\w\.]+',
    // 是否开启请求缓存 true 自动缓存 支持设置请求缓存规则
    'request_cache'         => false,
    // 请求缓存有效期
    'request_cache_expire'  => null,
    // 全局请求缓存排除规则
    'request_cache_except'  => [],
    // 默认应用
    'default_app'           => 'index',
    // 默认控制器名
    'default_controller'    => 'Index',
    // 默认操作名
    'default_action'        => 'index',
    // 操作方法后缀
    'action_suffix'         => '',
    // 默认JSONP格式返回的处理方法
    'default_jsonp_handler' => 'jsonpReturn',
    // 默认JSONP处理方法
    'var_jsonp_handler'     => 'callback',
];
